package com.china08.yxyapi.entity.mg.scoreport;

import java.util.List;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.china08.yxyapi.entity.mg.MongoBaseEntityNoId;

/**
 * @author Richard.Wang 考试
 */
@SuppressWarnings("serial")
@Document(collection = "yxy.tea.score.report.exam")
public class Exam extends MongoBaseEntityNoId {

    /** 主键 , 主键使用 生成的考试编号+班级id */
    @Id
    private String id;

    /**
     * 考试编号, 毫秒 yyyyMMddHHmmsss
     */
    @Field(value = "exam_id")
    private String examId;

    /** 考试名称 */
    @Field(value = "name")
    private String name;

    /**
     * 参考 word文档中的说明.
     */
    @Field(value = "type")
    private String type;

    /** 学校:ID */
    @Indexed
    @Field(value = "school_id")
    private String schoolId;

    /**
     * 学段
     */
    @Field(value = "stage")
    private String stage;

    /** 学科 */
    @Field(value = "subject")
    private String subject;

    /** 学科名称 */
    @Field(value = "subject_name")
    private String subjectName;

    /** 版本名称 */
    @Field(value = "version_name")
    private String versionName;

    /** 版本 */
    @Field(value = "version")
    private String version;

    /**
     * 册别
     */
    @Field(value = "semester")
    private String semester;

    /**
     * 册别名称
     */
    @Field(value = "semester_name")
    private String semesterName;

    /**
     * 存储为中文是否可以?
     */
    @Field(value = "book_contents")
    private List<BookContent> bookContents;

    /**
     * 考试总分 100,120,150,180
     */
    @Field(value = "total_score")
    private Integer totalScore;

    /** 考试时间 */
    @Field(value = "exam_date")
    private Integer examDate;

    /** 发布用户:ID */
    @Indexed
    @Field(value = "teacher_id")
    private String teacherId;

    /** 发布用户名称 */
    @Field(value = "teacher_nick")
    private String teacherNick;

    /**
     * 试题
     */
    @Field(value = "questions")
    private List<ExamQues> questions;

    /**
     * 状态 0--未录入数据 , 1--未发送,2--已发送
     */
    @Field(value = "status")
    private Integer status;

    /**
     * 发送报告时间
     */
    @Field(value = "send_date")
    private Integer sendDate;

    /** 班级 */
    @Field(value = "class_id")
    private String classId;// 班级id

    @Field(value = "class_name")
    private String className;// 班级名称

    @Field(value = "students")
    private List<Stu> students;// 本班级涉及到的学生

    /**
     * 
     */
    @Field(value = "thanks_users")
    private List<ThanksUser> thankUsers;

    public class Stu {
        public String student_id;
        public String student_name;
        public String student_no;
        public String grade_name;
        public Integer gender = 0;
    }

    public class BookContent {
        public String pid;
        public String id;
        public String name;
    }

    public class ThanksUser {
        public String user_id;
        public String user_nick;
        public String avatar;
    }

    public class ExamQues {
        public Integer section;// 大题号id
        public String sectionName;// 大题号名称
        public Integer no;// 小题id
        public String noName;// 小题号
        public Integer order_num;// 序列号
        public Integer score;// 分数
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getExamId() {
        return examId;
    }

    public void setExamId(String examId) {
        this.examId = examId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(String schoolId) {
        this.schoolId = schoolId;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Integer getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Integer totalScore) {
        this.totalScore = totalScore;
    }

    public Integer getExamDate() {
        return examDate;
    }

    public void setExamDate(Integer examDate) {
        this.examDate = examDate;
    }

    public String getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId;
    }

    public String getTeacherNick() {
        return teacherNick;
    }

    public void setTeacherNick(String teacherNick) {
        this.teacherNick = teacherNick;
    }

    public List<ExamQues> getQuestions() {
        return questions;
    }

    public void setQuestions(List<ExamQues> questions) {
        this.questions = questions;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getClassId() {
        return classId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public List<BookContent> getBookContents() {
        return bookContents;
    }

    public void setBookContents(List<BookContent> bookContents) {
        this.bookContents = bookContents;
    }

    public List<ThanksUser> getThankUsers() {
        return thankUsers;
    }

    public void setThankUsers(List<ThanksUser> thankUsers) {
        this.thankUsers = thankUsers;
    }

    public List<Stu> getStudents() {
        return students;
    }

    public void setStudents(List<Stu> students) {
        this.students = students;
    }

    public String getStage() {
        return stage;
    }

    public void setStage(String stage) {
        this.stage = stage;
    }

    public String getSemester() {
        return semester;
    }

    public void setSemester(String semester) {
        this.semester = semester;
    }

    public String getSemesterName() {
        return semesterName;
    }

    public void setSemesterName(String semesterName) {
        this.semesterName = semesterName;
    }

    public Integer getSendDate() {
        return sendDate;
    }

    public void setSendDate(Integer sendDate) {
        this.sendDate = sendDate;
    }

}
